<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>lib.scripting.Engine</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="lib.scripting-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;lib ::
        <a href="lib.scripting-module.html">Module&nbsp;scripting</a> ::
        Class&nbsp;Engine
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="lib.scripting.Engine-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Engine</h1><p class="nomargin-top"><span class="codelink"><a href="lib.scripting-pysrc.html#Engine">source&nbsp;code</a></span></p>
<p>Provides access to the internals of AutoKey.</p>
  <p>Note that any configuration changes made using this API while the 
  configuration window is open will not appear until it is closed and 
  re-opened.</p>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__init__"></a><span class="summary-sig-name">__init__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">configManager</span>,
        <span class="summary-sig-arg">runner</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lib.scripting-pysrc.html#Engine.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="lib.scripting.Engine-class.html#get_folder" class="summary-sig-name">get_folder</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">title</span>)</span><br />
      Retrieve a folder by its title</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lib.scripting-pysrc.html#Engine.get_folder">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="lib.scripting.Engine-class.html#create_phrase" class="summary-sig-name">create_phrase</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">folder</span>,
        <span class="summary-sig-arg">description</span>,
        <span class="summary-sig-arg">contents</span>)</span><br />
      Create a text phrase</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lib.scripting-pysrc.html#Engine.create_phrase">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="lib.scripting.Engine-class.html#create_abbreviation" class="summary-sig-name">create_abbreviation</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">folder</span>,
        <span class="summary-sig-arg">description</span>,
        <span class="summary-sig-arg">abbr</span>,
        <span class="summary-sig-arg">contents</span>)</span><br />
      Create a text abbreviation</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lib.scripting-pysrc.html#Engine.create_abbreviation">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="lib.scripting.Engine-class.html#create_hotkey" class="summary-sig-name">create_hotkey</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">folder</span>,
        <span class="summary-sig-arg">description</span>,
        <span class="summary-sig-arg">modifiers</span>,
        <span class="summary-sig-arg">key</span>,
        <span class="summary-sig-arg">contents</span>)</span><br />
      Create a text hotkey.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lib.scripting-pysrc.html#Engine.create_hotkey">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="lib.scripting.Engine-class.html#run_script" class="summary-sig-name">run_script</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">description</span>)</span><br />
      Run an existing script using its description to look it up</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lib.scripting-pysrc.html#Engine.run_script">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="get_folder"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">get_folder</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">title</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="lib.scripting-pysrc.html#Engine.get_folder">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Retrieve a folder by its title</p>
  <p>Usage: <code>engine.get_folder(title)</code></p>
  <p>Note that if more than one folder has the same title, only the first 
  match will be returned.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="create_phrase"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">create_phrase</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">folder</span>,
        <span class="sig-arg">description</span>,
        <span class="sig-arg">contents</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="lib.scripting-pysrc.html#Engine.create_phrase">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Create a text phrase</p>
  <p>Usage: <code>engine.create_phrase(folder, description, 
  contents)</code></p>
  <p>A new phrase with no abbreviation or hotkey is created in the 
  specified folder</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>folder</code></strong> - folder to place the abbreviation in, retrieved using 
          <code>engine.get_folder()</code></li>
        <li><strong class="pname"><code>description</code></strong> - description for the phrase</li>
        <li><strong class="pname"><code>contents</code></strong> - the expansion text</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="create_abbreviation"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">create_abbreviation</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">folder</span>,
        <span class="sig-arg">description</span>,
        <span class="sig-arg">abbr</span>,
        <span class="sig-arg">contents</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="lib.scripting-pysrc.html#Engine.create_abbreviation">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Create a text abbreviation</p>
  <p>Usage: <code>engine.create_abbreviation(folder, description, abbr, 
  contents)</code></p>
  <p>When the given abbreviation is typed, it will be replaced with the 
  given text.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>folder</code></strong> - folder to place the abbreviation in, retrieved using 
          <code>engine.get_folder()</code></li>
        <li><strong class="pname"><code>description</code></strong> - description for the phrase</li>
        <li><strong class="pname"><code>abbr</code></strong> - the abbreviation that will trigger the expansion</li>
        <li><strong class="pname"><code>contents</code></strong> - the expansion text</li>
    </ul></dd>
    <dt>Raises:</dt>
    <dd><ul class="nomargin-top">
        <li><code><strong class='fraise'>Exception</strong></code> - if the specified abbreviation is not unique</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="create_hotkey"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">create_hotkey</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">folder</span>,
        <span class="sig-arg">description</span>,
        <span class="sig-arg">modifiers</span>,
        <span class="sig-arg">key</span>,
        <span class="sig-arg">contents</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="lib.scripting-pysrc.html#Engine.create_hotkey">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Create a text hotkey.</p>
  <p>Usage: <code>engine.create_hotkey(folder, description, modifiers, key,
  contents)</code></p>
  <p>When the given hotkey is pressed, it will be replaced with the given 
  text. Modifiers must be given as a list of strings, with the following 
  values permitted:</p>
  <p>&lt;control&gt; &lt;alt&gt; &lt;super&gt; &lt;shift&gt;</p>
  <p>The key must be an unshifted character (i.e. lowercase)</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>folder</code></strong> - folder to place the abbreviation in, retrieved using 
          <code>engine.get_folder()</code></li>
        <li><strong class="pname"><code>description</code></strong> - description for the phrase</li>
        <li><strong class="pname"><code>modifiers</code></strong> - modifiers to use with the hotkey (as a list)</li>
        <li><strong class="pname"><code>key</code></strong> - the hotkey</li>
        <li><strong class="pname"><code>contents</code></strong> - the expansion text</li>
    </ul></dd>
    <dt>Raises:</dt>
    <dd><ul class="nomargin-top">
        <li><code><strong class='fraise'>Exception</strong></code> - if the specified hotkey is not unique</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="run_script"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">run_script</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">description</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="lib.scripting-pysrc.html#Engine.run_script">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Run an existing script using its description to look it up</p>
  <p>Usage: <code>engine.run_script(description)</code></p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>description</code></strong> - description of the script to run</li>
    </ul></dd>
    <dt>Raises:</dt>
    <dd><ul class="nomargin-top">
        <li><code><strong class='fraise'>Exception</strong></code> - if the specified script does not exist</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="lib.scripting-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Fri Jan  8 10:15:41 2010
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
